package ferp.center.server.messages;

import ferp.core.Message;
import ferp.core.game.Settings;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * User: igorgok
 * Date: 8/21/13 10:49 AM
 */
public class Messages
{
  public static List<Message> get(Settings.Locale locale, int version, Date date)
  {
    List<Message> list = new ArrayList<Message>();
    Message[] source = (locale == Settings.Locale.RUSSIAN ? Russian.messages : English.messages);

    for (Message m : source)
      if (m.fits(version, date))
        list.add(m);

    return list;
  }
}
